#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
int my_atoi(const char* str)
{
	assert(str != NULL);
	int num = 0;
	while(*str)
	{
		if (*str == ' ')
			str++;
		else if (*str >= '0' && *str <= '9')
			num = num * 10 + *str - '0';
		else
			return num;
	}
}



int main()
{
	char arr[] = "   2123";
	char brr[] = ":1232";
	char crr[] = "  23423:{}";
	printf("%d\n", atoi(arr));
	printf("%d\n", atoi(brr));
	printf("%d\n", atoi(crr));

	return 0;
}


